﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>仪器列表</title>
<#include "/admin/common_css.ftl">
<#include "/admin/common_js.ftl">
<script type="text/javascript" src="${base}/apache/common/js/jquery.pager.js"></script>
<script type="text/javascript">
$(document).ready(function() {

	var $deleteDeviceInfoButton = $("#listTable .deleteDeviceInfoButton");
	
	// 删除仪器信息
	$deleteDeviceInfoButton.click( function() {
		if (confirm("您确定要删除此仪器信息吗?") == false) {
			return false;
		}
	});
	});
	</script>
</head>
<body class="list">
	<div class="bar">
		仪器列表&nbsp;总记录数: ${pager.totalCount} (共${pager.pageCount}页)
	</div>
	<div class="body">
		<form id="listForm" action="${base}/faith/device/searchdevices" method="post">
			<div class="listBar">
				<input type="button" class="formButton" id="deleteButton" value="批量删除" url="batchDelete" hidefocus />
				<input type="button" class="formButton" onclick="location.href='new'" value="添加仪器" hidefocus />
				&nbsp;&nbsp;
				<label style="font-weight:bold;">仪器名称: </label>
				<input type="text"  class='searchText' name="propertyName" value="${(deviceInfo.propertyName)!}" />
				<label style="font-weight:bold;">分类代码: </label>
				<input type="text"  class='searchText' name="classifyName" value="${(deviceInfo.classifyName)!}" />
				<label style="font-weight:bold;">规格型号: </label>
				<input type="text" class="searchText" name="specificationType" value="${(deviceInfo.specificationType)!}" />
				<label style="font-weight:bold;">测定指标: </label>
				<input type="text" class="searchText" name="metric" value="${(deviceInfo.metric)!}" />				
				<label style="font-weight:bold;">共享模式: </label>
				<select name="isShared">
					<option value="" <#if !deviceInfo.isShared?has_content> selected</#if> >
						请选择
					</option>
					<option value="1" <#if deviceInfo != null&&deviceInfo.isShared == 1> selected</#if>>
						共享
					</option>
					<option value="2" <#if deviceInfo != null&&deviceInfo.isShared == 2> selected</#if>>
						所内共享
					</option>
					<option value="3" <#if deviceInfo != null&&deviceInfo.isShared == 3> selected</#if>>
						专用
					</option>
				</select>
				<input type="button" id="searchButton" class="formButton" value="搜 索" hidefocus />
				&nbsp;&nbsp;
				<label>每页显示: </label>
				<select name="pageSize" id="pageSize">
					<option value="10"<#if pager.pageSize == 10> selected</#if>>
						10
					</option>
					<option value="20"<#if pager.pageSize == 20> selected</#if>>
						20
					</option>
					<option value="50"<#if pager.pageSize == 50> selected</#if>>
						50
					</option>
					<option value="100"<#if pager.pageSize == 100> selected</#if>>
						100
					</option>
				</select>
			</div>
			<table id="listTable" class="listTable">
				<tr>
					<th class="check">
						<input type="checkbox" class="allCheck" />
					</th>
					<th>
						<a href="#" class="sort"  hidefocus>仪器名称</a>
					</th>
					<th>
						<a href="#" class="sort"  hidefocus>仪器编号</a>
					</th>
					<th>
						<a href="#" class="sort"  hidefocus>分类代码</a>
					</th>
					<th>
						<a href="#" class="sort" hidefocus>共享模式</a>
					</th>
					<th>
						<a href="#" class="sort" hidefocus>存放地点</a>
					</th>
					<th>
						<a href="#" class="sort"  hidefocus>规格型号</a>
					</th>
					<th>
						<a href="#" class="sort" hidefocus>测定指标</a>
					</th>
					<th>
						<span>操作</span>
					</th>
				</tr>
				<#list pager.result as deviceInfo>
					<tr>
						<td>
							<input type="checkbox" name="ids" value="${deviceInfo.id}" />
						</td>
						<td>
							${deviceInfo.propertyName}
						</td>
						<td>
							${deviceInfo.classifyId}
						</td>
						<td>
							${deviceInfo.classifyName}
						</td>
						<td>
							<#if deviceInfo != null&&deviceInfo.isShared == 1>共享
								<#elseif deviceInfo != null&&deviceInfo.isShared == 2>所内共享
								<#else>专用
							</#if>
						</td>
						<td>
							${(deviceInfo.location)!}
						</td>
						<td>
							${(deviceInfo.specificationType)!}
						</td>
						<td>
							${(deviceInfo.metric)!}
						</td>
						<td>
							<a href="detail/${deviceInfo.id}" target="mainFrame" title="详情">[详情]</a>
							<a href="edit/${deviceInfo.id}" title="编辑">[编辑]</a>
							<a href="delete/${deviceInfo.id}"  class="deleteDeviceInfoButton"  title="删除">[删除]</a>
						</td>
					</tr>
				</#list>
			</table>
			<#if (pager.result?size > 0)>
				<div class="pagerBar">
					<div class="pager">
						<#include "admin/pager.ftl" />
					</div>
				<div>
			<#else>
				<div class="noRecord">没有找到任何记录!</div>
			</#if>
		</form>
	</div>
</body>
</html>